Skip to main content
This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal

HCL Notes/Domino 8.5 Forum (includes Notes Traveler)

HCL Notes/Domino 8.5 Forum (includes Notes Traveler)

Previous Next

good point, but...

Thanks, Willy. Your point about UNID values is well taken. I think I knew that rule at one point but Notes hasn't been my primary dev environment for a few years now. I'll have to consider some code re-writes to move in that direction.

In the mean time, however, I am still baffled by the current behavior. There are no "On Error" statements at all anywhere in this script library. Here's a more complete code dump, if that helps anyone.

<div style="white-space:pre-wrap>
Function ImpUpdateLetter(letterDoc As NotesDocument,researchDoc As NotesDocument,allowSaveLetter As Boolean) As String
Dim s As New NotesSession

Dim HTMLString As String
Dim letterId As String
Dim resId As String

Dim impCon As lcManager
Dim impConAttach As lcManager

Dim lcConFiles As LCConnection
Dim flFiles As LCFieldList

Dim dirTemp As WindowsTempDir ' custom class creates a unique temp directory for file handling

Dim htmlDbName As String

Dim startString As String, endString As String, findString As String
Dim pos1 As Integer, pos2 As Integer

Dim ws As New NotesUIWorkspace
Dim letterBody As NotesRichTextItem
Dim dateApproved As String
Dim dateCreated As String
Dim researchId As String
Dim sql As String
Dim saveLetter As Boolean
Dim resUnid As String

Dim oFilePath As String
Dim fileNameSuffix As Integer

Dim htmlDB As NotesDatabase
Dim htmlAgent As NotesAgent
Dim htmlDoc As NotesDocument
Dim htmlItem As NotesItem
Dim noteid As String
Dim i As Integer

Dim fNameWeb As Variant
Dim lcfFileName As Lcfield
Dim breakWhile As Boolean
Dim nextSearchStart As Integer
Dim replaceString As String
Dim attachId As String
Dim fileExt As String
Dim fileTypeImage As String


'INITIALIZE VALUES

htmlDbName = "WebAccess.nsf"

Set impCon = New lcBlues("IGDev_TPM")
Set impConAttach = New lcBlues("IGDev_TPM")
impConAttach.SetMapByname(True)
impConAttach.SetMetadata("research_letter_attachment")

If Not lcconFiles Is Nothing Then
Call lcconFiles.Action(LCACTION_TRUNCATE) ' get rid of the attachment files.
End If

Set dirTemp = Nothing
Set lcConFiles = Nothing

Set dirTemp = New WindowsTempDir()

Set lcConFiles = New LCConnection("file")
lcConFiles.Database = dirTemp.dirpath ' set file connector to use new directory.
lcConFiles.Metadata = dirTemp.dirname
lcConFiles.Binary = True ' the files we're working with are binary -- don't convert to text.
lcConFiles.Connect

' Set flNotes = New LCFieldList
' Set flNotesKeys = New LCFieldList
Set flFiles = New LCFieldList

'Initialize field list from the file connection - no actual files but establishes the field names
Call lcconFiles.Select(Nothing, 1, flFiles)

If letterDoc Is Nothing then
Set letterDoc = ws.Currentdocument.Document
End If

Set letterBody = letterDoc.Getfirstitem("Body_Co")
stop
resUnid = letterDoc.ResearchRequestID(0)
If researchDoc Is Nothing Then
Set researchDoc = s.CurrentDatabase.Getdocumentbyunid(resUnid)
If researchDoc Is Nothing Then
MsgBox "Unable to find research request for this letter (" & s.CurrentDatabase.Title & " -- " & resUnid & ")",0,"Programming error."
End
End If
End If
...
</div>


Feedback response number WEBB9566XK created by ~Mark Nonjipysterings on 02/22/2013

GetDocumentByUNID - no error, no do... (~Mark Nonjipyst... 21.Feb.13)
. . On Error Resume Next (~Fred Xanjumima... 21.Feb.13)
. . . . good point, but... (~Mark Nonjipyst... 22.Feb.13)
. . . . . . could be finding a deletion stub...... (~Justin Chugero... 22.Feb.13)
. . NotesView GetDocumentByKey doesn't ... (~Mark Nonjipyst... 22.Feb.13)
. . solution - declare notesdocument lo... (~Mark Nonjipyst... 25.Feb.13)
. . . . Not quite as you are thinking, but ... (~Fred Asatumibu... 25.Feb.13)
. . . . . . Well, shucks (~Mark Nonjipyst... 25.Feb.13)




Printer-friendly

Search this forum

Member Tools


RSS Feeds

 RSS feedsRSS
All forum posts RSS
All main topics RSS